<?php
$section = 1;
include("includes/secure.php");
include("../includes/config.php");
include("../includes/class/user.class.php");


$user = new User(); 
$code	= $_GET['code'];

$data = $user->getUserAcces($code);
if(isset($_POST['save']) && $_POST['save'] == 1)
{
	for($i=0;$i<count($data);$i++)
	{
		$property = mysql_real_escape_string($_POST[$data[$i]->mod_code]);
		$user->setProperty($property,$data[$i]->mod_code,$code);
	}
	
	$delay=0;
	$url="list_user.php";
	echo "<meta http-equiv='Refresh' content='$delay; url=$url'>";	
}
?>
